package backstage.menu.action;

import java.util.List;

import backstage.competence.service.CompetenceService;
import backstage.menu.vo.SysMenuVo;
import backstage.staff.pojo.Staff;
import backstage.sys.action.PlatformAction;
import backstage.sys.util.Platform;

public class MenuAction extends PlatformAction{

	private static final long serialVersionUID = 1L;
	
	public String execute() throws Exception{
		Staff staff = (Staff)getSession().getAttribute("staff");
		Integer id = staff.getCompetence().getId();
		CompetenceService cs = (CompetenceService)Platform.getInstance().getApplication().getBean("competenceService");
		//需要改
		List<SysMenuVo> list = cs.getMenus(id);
		getSession().setAttribute("list", list);
		return "success";
	}

}
